﻿using DocMark;

Console.WriteLine("请选择文件类型 1.pdf 2.docx 3.quit");

MarkSetting wordSetting = new()
{
    FileType = FileType.Docx,
    OrignColor = System.Drawing.Color.FromArgb(255, 255, 0, 0),
    MarkColor = System.Drawing.Color.FromArgb(255, 255, 0, 0),
};
MarkSetting pdfSetting = new()
{
    FileType = FileType.Pdf,
    OrignColor = System.Drawing.Color.FromArgb(255, 255, 0, 0),
    MarkColor = System.Drawing.Color.FromArgb(255, 255, 0, 0),
};
DocumentMark documentMark = new();
documentMark.ProcessMsgEvent += (msg) =>
{
    Console.WriteLine(msg);
};
bool loop = true;
while (loop)
{
    Console.WriteLine("请输入：");
    ConsoleKeyInfo keyinfo = Console.ReadKey();
    Console.WriteLine();
    switch (keyinfo.KeyChar)
    {
        case '1':
            await documentMark.MarkAsync(pdfSetting);
            break;
        case '2':
            await documentMark.MarkAsync(wordSetting);
            break;
        case '3':
            loop = false;
            break;
    }
}
